/* 用户个人中心页面样式 */
.user-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

.user-header {
  text-align: center;
  margin-bottom: 40px;
}

.user-title {
  font-size: 28px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.user-subtitle {
  font-size: 16px;
  color: #6b7280;
}

.user-form {
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.avatar-section {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.avatar-display {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e5e7eb;
  margin-right: 20px;
}

.avatar-info h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #1f2937;
}

.avatar-info p {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #6b7280;
}

.avatar-upload-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.avatar-upload-btn:hover {
  background: #5a67d8;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.form-group {
  flex: 1;
}

.form-group.full-width {
  flex: none;
  width: 100%;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.gender-buttons {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.gender-btn {
  padding: 10px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
  text-align: center;
}

.gender-btn:hover {
  border-color: #667eea;
  color: #667eea;
  background-color: #f0f4ff;
}

.gender-btn.active {
  border-color: #667eea;
  background-color: #667eea;
  color: white;
}

.gender-btn.active:hover {
  background-color: #5a67d8;
  border-color: #5a67d8;
}

.save-btn {
  display: block;
  margin: 32px auto 0;
  padding: 12px 32px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-btn:hover:not(:disabled) {
  background: #5a67d8;
  transform: translateY(-1px);
}

.save-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  transform: none;
}

.readonly-field {
  background-color: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

/* 头像上传对话框样式 */
.avatar-upload-dialog {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  margin: 0 0 20px 0;
  transition: border-color 0.2s;
  min-height: 200px;
  width: 100%;
  box-sizing: border-box;
}

.upload-area.dragover {
  border-color: #667eea;
  background-color: #f0f4ff;
}

.upload-icon {
  font-size: 48px;
  color: #9ca3af;
  margin: 0 0 16px 0;
  display: block;
}

.upload-text {
  color: #6b7280;
  margin: 0 0 16px 0;
  line-height: 1.5;
  text-align: center;
}

.upload-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin: 0;
}

.preview-area {
  display: none;
  text-align: center;
  margin: 0 0 20px 0;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

.preview-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  display: block;
  margin: 0 auto;
}

.crop-info {
  margin: 12px 0 0 0;
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  line-height: 1.4;
}

/* 上传进度条样式 */
.upload-progress {
  margin-top: 20px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.upload-text small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #9ca3af;
}